import 'package:demo1/provider/chatdetailprovider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'chatdetail_bar_ui.dart';
import 'chatdetail_input_ui.dart';
import 'chatdetail_messages_ui.dart';

class ChatdetailUI extends ConsumerWidget {

  ChatdetailUI({super.key,required this.chatDetailProvider});


  ChangeNotifierProvider<ChatDetailProvider> chatDetailProvider;



  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return Scaffold(
      appBar: AppBar(
          elevation: 0,
          automaticallyImplyLeading: false,
          backgroundColor: Colors.white,
          flexibleSpace: SafeArea(
              child: ChatdetailBarUI(
            chatDetailProvider: chatDetailProvider,
          ))),
      body: Stack(
        children: <Widget>[
          ChatdetailMessagesUi(chatDetailProvider: chatDetailProvider,),

          ChatdetailInputUI(
           chatDetailProvider: chatDetailProvider,
          ),
        ],
      ),
    );
  }
}
